#include <gmlib/number/mont256.h>
#include <gmlib/number/uint256.h>

#include <stdexcept>
#include <cstring>

using namespace number;

static std::uint8_t  P_data[32]      = {0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
static std::uint8_t  P_SUB2_data[32] = {0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd};
static std::uint8_t  R_data[32]      = {0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01};
static std::uint8_t  R_POW2_data[32] = {0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03};
static std::uint8_t  N_data[32]      = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01};

void test_mont256_from_bytes_ex()
{
    uint256_t P, P_SUB2, R, R_POW2, N_;
    uint256_from_bytes(P, P_data);
    uint256_from_bytes(P_SUB2, P_SUB2_data);
    uint256_from_bytes(R, R_data);
    uint256_from_bytes(R_POW2, R_POW2_data);
    uint256_from_bytes(N_, N_data);

    Mont256CTX ctx;
    ctx.P = P, ctx.P_SUB2 = P_SUB2;
    ctx.R = R, ctx.R_POW2 = R_POW2;
    ctx.N_ = N_;

    mont256_t    ret;
    std::uint8_t ret_data[32];

    std::uint8_t num0[42] = {0xbf,0x6a,0x07,0xa7,0xca,0x9b,0xd2,0xb9,0x66,0x80,0xf3,0xc6,0xc6,0x8f,0x95,0x11,0x99,0xfe,0xec,0x1f,0xca,0x8b,0xa2,0xa0,0x14,0x7e,0xa9,0x85,0x76,0x88,0xa4,0xf0,0xdc,0x42,0x17,0x0e,0x02,0x9a,0x42,0x80,0xcf,0x89};
    std::uint8_t ret0[32] = {0xce,0x28,0xb7,0x15,0x95,0x11,0x99,0xfe,0xec,0x20,0x89,0xf5,0xaa,0x47,0xdf,0x1a,0x7c,0x3e,0xdd,0x08,0xca,0x8f,0xab,0x26,0x1e,0xb6,0x8c,0xa0,0x1c,0xe2,0xc0,0x0f};
    mont256_from_bytes_ex(&ctx, ret, num0, 42);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret0, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num1[20] = {0x46,0x2e,0xb6,0x3d,0x4b,0x3c,0x4f,0xf2,0x2d,0xd6,0xa7,0x45,0x23,0x20,0x8e,0x08,0x03,0x76,0x3c,0x6c};
    std::uint8_t ret1[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x2e,0xb6,0x3d,0x4b,0x3c,0x4f,0xf2,0x2d,0xd6,0xa7,0x45,0x23,0x20,0x8e,0x08,0x03,0x76,0x3c,0x6c};
    mont256_from_bytes_ex(&ctx, ret, num1, 20);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret1, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num2[51] = {0xdf,0xab,0x0f,0x86,0x24,0xd4,0x66,0x32,0xc9,0x31,0xa4,0x3d,0xdd,0xd8,0x78,0xde,0x9f,0xd2,0xd1,0x7b,0x76,0xa5,0xfa,0xde,0x78,0xc9,0x5b,0x3f,0xb7,0x30,0x52,0x08,0x33,0x25,0x0a,0x78,0x0c,0x66,0x52,0x7f,0xc7,0xb0,0xd2,0x23,0xa8,0x13,0x2e,0xae,0x20,0x29,0x44};
    std::uint8_t ret2[32] = {0x52,0xa1,0xad,0x6e,0x64,0x9d,0x9d,0xc1,0x72,0x80,0x61,0xf6,0x46,0xf0,0xa8,0x92,0xdd,0xb0,0xb8,0x99,0x63,0x4a,0x05,0x88,0x1b,0x53,0x9c,0xc1,0x84,0x6b,0x85,0xa8};
    mont256_from_bytes_ex(&ctx, ret, num2, 51);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret2, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num3[84] = {0x22,0x68,0x08,0x7a,0x9b,0xc8,0x5b,0x3f,0xd0,0xb4,0x02,0x72,0x50,0xe3,0x3b,0x8c,0x5c,0x9b,0xf9,0xb3,0x21,0x34,0xe7,0x1f,0xad,0x09,0xa9,0xe4,0x3f,0x51,0xa7,0xa8,0xcb,0x67,0xd8,0x7a,0xf3,0x5c,0xc9,0x0f,0x95,0xac,0x73,0x5a,0xfb,0x74,0x98,0x63,0x7c,0x5b,0x2d,0xa4,0x0d,0x35,0x10,0xf0,0x7a,0x00,0xae,0x54,0xa8,0xc2,0x8c,0xf5,0x2c,0x39,0x28,0x26,0x00,0xce,0xf3,0x18,0xab,0x85,0xb8,0x0a,0x63,0xd5,0x32,0x49,0xef,0x8c,0x13,0x91};
    std::uint8_t ret3[32] = {0x46,0x9d,0xb1,0x4d,0x50,0xfc,0x64,0xfc,0xe9,0xc8,0x90,0x5d,0x67,0xd2,0xbe,0x2e,0xef,0x47,0xe3,0x89,0xbe,0xb3,0x05,0x9e,0x15,0xc5,0xb7,0xf2,0x6a,0x41,0x0c,0x65};
    mont256_from_bytes_ex(&ctx, ret, num3, 84);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret3, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num4[7] = {0xe8,0x27,0xbe,0xaf,0xd3,0xe1,0x02};
    std::uint8_t ret4[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0x27,0xbe,0xaf,0xd3,0xe1,0x02};
    mont256_from_bytes_ex(&ctx, ret, num4, 7);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret4, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num5[10] = {0xda,0xe4,0xbe,0x42,0x66,0x00,0x99,0x1f,0x0c,0x8e};
    std::uint8_t ret5[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xda,0xe4,0xbe,0x42,0x66,0x00,0x99,0x1f,0x0c,0x8e};
    mont256_from_bytes_ex(&ctx, ret, num5, 10);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret5, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num6[69] = {0x2b,0x65,0x9b,0x90,0xb9,0x82,0xe6,0x92,0xfe,0x2f,0x09,0xcd,0x9a,0x6f,0x7d,0x33,0x92,0xe0,0xcf,0x84,0x59,0xaf,0x8c,0xfe,0x90,0x97,0xc9,0x63,0x38,0x72,0x99,0x17,0xcd,0xaa,0x08,0xf6,0xe4,0xad,0xaf,0x63,0x41,0x17,0xf3,0xbc,0x7f,0xa9,0x81,0xce,0x74,0x1f,0x5f,0x93,0x40,0xc1,0x4e,0x6a,0x1c,0x11,0xb0,0x16,0x14,0x71,0x31,0xde,0x59,0xb1,0xc0,0x5f,0x29};
    std::uint8_t ret6[32] = {0x2f,0x76,0xdb,0xaf,0x44,0xa8,0x3d,0x47,0x4b,0x3a,0xe9,0xbb,0x28,0xdb,0x22,0x69,0xbd,0x71,0x5e,0x57,0xf0,0xeb,0x75,0x24,0xaa,0x85,0xf3,0x03,0x6a,0x36,0x2f,0x2f};
    mont256_from_bytes_ex(&ctx, ret, num6, 69);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret6, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num7[13] = {0x28,0x28,0xbd,0x46,0xbc,0xc2,0xb2,0x5c,0x6c,0x89,0x44,0x61,0x8b};
    std::uint8_t ret7[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0xbd,0x46,0xbc,0xc2,0xb2,0x5c,0x6c,0x89,0x44,0x61,0x8b};
    mont256_from_bytes_ex(&ctx, ret, num7, 13);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret7, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num8[47] = {0x8b,0x69,0xa1,0x7d,0x31,0x44,0x2a,0x0e,0xfa,0x7d,0xa6,0x56,0xa1,0xc7,0x5c,0x76,0x77,0xb2,0x26,0x55,0xbe,0x34,0x79,0x5a,0x84,0xda,0x76,0xa9,0xda,0x38,0x8b,0x90,0x83,0xb0,0x13,0x4c,0x66,0x5d,0xe1,0xc1,0x7c,0xef,0x34,0x10,0x9e,0x56,0xbb};
    std::uint8_t ret8[32] = {0x59,0xd0,0xa4,0xf4,0x56,0x49,0x9e,0x1a,0xd7,0xb6,0x1e,0xa0,0xb8,0xd4,0xb6,0x31,0xe7,0xb0,0xe1,0x10,0xe6,0xca,0x18,0xdf,0x4e,0x34,0x1a,0xa5,0xf3,0xf7,0x49,0x89};
    mont256_from_bytes_ex(&ctx, ret, num8, 47);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret8, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num9[75] = {0x94,0xf4,0xd8,0x7e,0xef,0xa2,0x3a,0x1f,0xed,0x49,0xe0,0x59,0x40,0x9b,0x84,0xa2,0x27,0xd8,0xce,0xd0,0xf1,0x01,0xa9,0xd7,0xd4,0xd7,0xea,0x09,0xf1,0x74,0x83,0xdf,0xe5,0x90,0x6d,0x5a,0x7d,0x68,0x65,0x36,0x68,0x5a,0x50,0x01,0xec,0x16,0x1d,0x82,0x81,0x02,0xb3,0xa0,0x2f,0x2e,0x1c,0x14,0x4f,0xff,0x24,0xc8,0xf2,0x3c,0x39,0x73,0xd0,0x47,0x28,0x2f,0x99,0x90,0xc5,0xdd,0xd1,0xa9,0xa8};
    std::uint8_t ret9[32] = {0x9b,0xab,0xbb,0xe0,0x47,0x3a,0x16,0x5e,0x46,0x4a,0x9a,0xaf,0x53,0x9e,0x9d,0x58,0x5d,0x55,0xf2,0x4f,0x50,0x46,0x3d,0x1c,0xd2,0x82,0x0e,0x28,0x28,0x1a,0x58,0xcf};
    mont256_from_bytes_ex(&ctx, ret, num9, 75);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret9, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num10[8] = {0xd0,0x0d,0x8d,0x0c,0xd6,0xf9,0xc7,0x1e};
    std::uint8_t ret10[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x0d,0x8d,0x0c,0xd6,0xf9,0xc7,0x1e};
    mont256_from_bytes_ex(&ctx, ret, num10, 8);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret10, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num11[65] = {0x8d,0x3a,0x18,0xbf,0xc8,0xf9,0x96,0x29,0x8b,0x27,0x87,0x77,0xbf,0x7d,0xad,0x3c,0xb6,0xdf,0xfa,0x9a,0xab,0x5a,0xb1,0xf1,0x09,0xea,0x15,0x95,0x29,0x1c,0x72,0x91,0x2e,0x33,0x27,0x89,0xdc,0xc9,0x48,0x71,0x0c,0x6c,0x3e,0x72,0x6c,0xdb,0x6f,0xe8,0xa8,0xdf,0xe0,0xf6,0x9c,0x9a,0x61,0x3e,0x33,0xe9,0xaa,0x74,0x91,0x04,0x6f,0xdd,0x6f};
    std::uint8_t ret11[32] = {0x60,0x3c,0x39,0x7b,0xdc,0xf1,0xf6,0x26,0x5c,0x3f,0x84,0xe0,0x97,0xff,0x45,0xb4,0xdc,0xb9,0x39,0xa7,0x72,0xbb,0x76,0x05,0x1a,0xff,0x1d,0xa8,0x79,0xbe,0x90,0x01};
    mont256_from_bytes_ex(&ctx, ret, num11, 65);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret11, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num12[28] = {0x8a,0x51,0x67,0x88,0x15,0xbb,0x55,0x49,0xa5,0x7c,0x20,0x4e,0x48,0x88,0x80,0x7d,0x03,0x39,0x43,0x0f,0x06,0xd2,0x0a,0xe7,0xc0,0xf7,0xf4,0xc8};
    std::uint8_t ret12[32] = {0x00,0x00,0x00,0x00,0x8a,0x51,0x67,0x88,0x15,0xbb,0x55,0x49,0xa5,0x7c,0x20,0x4e,0x48,0x88,0x80,0x7d,0x03,0x39,0x43,0x0f,0x06,0xd2,0x0a,0xe7,0xc0,0xf7,0xf4,0xc8};
    mont256_from_bytes_ex(&ctx, ret, num12, 28);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret12, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num13[5] = {0x59,0xf3,0x56,0xdf,0x5e};
    std::uint8_t ret13[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x59,0xf3,0x56,0xdf,0x5e};
    mont256_from_bytes_ex(&ctx, ret, num13, 5);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret13, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num14[12] = {0xee,0xff,0x7f,0xa6,0x81,0x16,0xf2,0xf6,0x00,0xaf,0xa9,0x87};
    std::uint8_t ret14[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xee,0xff,0x7f,0xa6,0x81,0x16,0xf2,0xf6,0x00,0xaf,0xa9,0x87};
    mont256_from_bytes_ex(&ctx, ret, num14, 12);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret14, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num15[56] = {0xf4,0xc2,0x83,0x8a,0xdf,0xff,0x9f,0x37,0xe6,0xf7,0x04,0xff,0x6d,0x30,0x90,0xd6,0x6c,0x07,0x58,0x05,0xb4,0x1b,0xf0,0xd6,0xe6,0xbf,0xae,0xca,0x10,0xd5,0x81,0xec,0xc4,0x99,0x74,0xf1,0x62,0xa9,0x49,0x84,0x36,0x4d,0x5d,0x5c,0xc6,0x36,0x3e,0xd5,0x5b,0x10,0xd1,0xc1,0x88,0x6b,0xe4,0xcb};
    std::uint8_t ret15[32] = {0x04,0x8e,0xd3,0x03,0xf7,0xcc,0x86,0xed,0x26,0x8c,0x89,0x53,0xa3,0x72,0xc4,0x4e,0x9a,0xe4,0xf9,0x81,0xb1,0x50,0x72,0x6c,0xf0,0x01,0xe2,0x61,0xc6,0x3b,0x69,0xcd};
    mont256_from_bytes_ex(&ctx, ret, num15, 56);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret15, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num16[54] = {0x27,0xdf,0xc5,0xd0,0x2d,0xc6,0x46,0x05,0x00,0xe9,0x83,0x53,0x44,0x0a,0xbb,0x5a,0x42,0x63,0x6a,0x50,0xd3,0x69,0x79,0x16,0x5a,0x04,0xe8,0xf5,0x13,0x12,0x50,0x7c,0x3a,0x52,0xc1,0x47,0xd6,0xe5,0xd0,0x38,0xda,0xee,0x37,0xcc,0xf4,0x2e,0x82,0x64,0xcc,0x33,0x0e,0x47,0xae,0x08};
    std::uint8_t ret16[32] = {0xf3,0xba,0x60,0x11,0x2e,0xfa,0x13,0xfb,0xd3,0xcf,0xa6,0x3d,0x42,0x72,0x6e,0xef,0x46,0x5f,0x2c,0xc6,0x12,0x21,0xb6,0x82,0xcc,0xe7,0xa9,0x30,0xc3,0x1b,0x86,0x4e};
    mont256_from_bytes_ex(&ctx, ret, num16, 54);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret16, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num17[9] = {0x53,0xe5,0x0b,0xc9,0x10,0xa6,0xfb,0xd4,0x54};
    std::uint8_t ret17[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,0xe5,0x0b,0xc9,0x10,0xa6,0xfb,0xd4,0x54};
    mont256_from_bytes_ex(&ctx, ret, num17, 9);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret17, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num18[31] = {0x46,0xdb,0xe9,0x8e,0x84,0x77,0xc4,0xe4,0x46,0x28,0x6b,0x66,0x60,0x47,0xaf,0xbb,0x06,0x7e,0x7e,0xc9,0xab,0xf6,0x70,0x85,0xe8,0x44,0xaf,0xdf,0x9d,0x58,0x76};
    std::uint8_t ret18[32] = {0x00,0x46,0xdb,0xe9,0x8e,0x84,0x77,0xc4,0xe4,0x46,0x28,0x6b,0x66,0x60,0x47,0xaf,0xbb,0x06,0x7e,0x7e,0xc9,0xab,0xf6,0x70,0x85,0xe8,0x44,0xaf,0xdf,0x9d,0x58,0x76};
    mont256_from_bytes_ex(&ctx, ret, num18, 31);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret18, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num19[12] = {0xb4,0x9b,0x33,0x6a,0x86,0x43,0x00,0xae,0x59,0xb7,0xe7,0x10};
    std::uint8_t ret19[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x9b,0x33,0x6a,0x86,0x43,0x00,0xae,0x59,0xb7,0xe7,0x10};
    mont256_from_bytes_ex(&ctx, ret, num19, 12);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret19, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num20[71] = {0x67,0x9c,0xdc,0x1e,0x32,0x12,0x6c,0xe8,0x3b,0x85,0xad,0xb0,0xf8,0x7f,0x9d,0x5a,0xc0,0xf8,0xd4,0x19,0x6b,0x07,0x18,0x2d,0xc9,0x8b,0x05,0x21,0x7c,0x5e,0x3b,0xa1,0x54,0xb4,0x7d,0x00,0x79,0x4a,0x26,0x8e,0xab,0xd7,0xfa,0x18,0xb9,0x25,0xe0,0xc5,0x27,0x26,0x43,0xaf,0x79,0x5c,0xe2,0x47,0x37,0xbe,0x0c,0x57,0x4c,0xb0,0x3c,0xb6,0xe7,0x8b,0x93,0x93,0xeb,0x6a,0xb5};
    std::uint8_t ret20[32] = {0xfd,0xf1,0x46,0xd6,0x1c,0x82,0x77,0xe6,0xe1,0x6d,0xb7,0x95,0x2e,0x8f,0x7f,0x35,0x39,0x68,0x9f,0x1d,0x8a,0xc3,0xed,0x03,0x8b,0xb1,0x2f,0x41,0xe2,0x89,0x00,0xa6};
    mont256_from_bytes_ex(&ctx, ret, num20, 71);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret20, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num21[55] = {0x6c,0x0f,0x6b,0x76,0x58,0x83,0x59,0xf9,0xd1,0xc7,0xc6,0x16,0x25,0x92,0x09,0x17,0x5d,0xb5,0x94,0x1e,0x3c,0x55,0xdd,0x35,0x80,0x4d,0x5b,0xe6,0x64,0x18,0x30,0xd6,0x30,0xf7,0xab,0x54,0x53,0x89,0x8e,0x2c,0x5c,0xfd,0xaa,0xf1,0x90,0x48,0xe5,0x05,0xe8,0xef,0x9b,0x5f,0x06,0x2f,0x42};
    std::uint8_t ret21[32] = {0x68,0x9a,0xd8,0x26,0xe0,0x35,0xdf,0xf6,0xec,0xc2,0x99,0x1f,0xe2,0x75,0xd1,0xe7,0xbb,0x9b,0xbd,0x7e,0xbb,0x8a,0x2e,0x08,0xa4,0x02,0x91,0xc4,0x1b,0xc8,0x36,0xb3};
    mont256_from_bytes_ex(&ctx, ret, num21, 55);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret21, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num22[8] = {0x2b,0x92,0xdb,0xd8,0x1f,0x57,0xaf,0xc5};
    std::uint8_t ret22[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2b,0x92,0xdb,0xd8,0x1f,0x57,0xaf,0xc5};
    mont256_from_bytes_ex(&ctx, ret, num22, 8);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret22, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num23[73] = {0x14,0x99,0x16,0x4c,0x87,0xb3,0x3e,0xd0,0x4f,0xad,0x66,0xc0,0xfd,0xbc,0x0b,0x22,0x3c,0x73,0x2c,0x11,0x86,0xea,0x9b,0xff,0x0a,0x02,0x64,0x73,0x94,0x3b,0x32,0x3b,0x21,0x9d,0x6c,0x29,0x07,0x9a,0xfa,0x24,0xdc,0x99,0x61,0xeb,0x34,0xd1,0xe8,0xbb,0x75,0x82,0xd2,0x4b,0xbc,0x2c,0x55,0x92,0x34,0x4e,0x46,0x7e,0xf2,0x12,0x5c,0x44,0x55,0xf3,0xea,0x42,0xfe,0x33,0xcd,0xe9,0x48};
    std::uint8_t ret23[32] = {0xae,0xba,0x9d,0x5f,0x3d,0x52,0xff,0x7f,0x94,0x5e,0x59,0xb1,0xcb,0x88,0x87,0x68,0x0b,0x0a,0x73,0x8c,0xc5,0x53,0x59,0x12,0x31,0x59,0x78,0x49,0xcb,0xb8,0x71,0xf7};
    mont256_from_bytes_ex(&ctx, ret, num23, 73);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret23, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num24[16] = {0x25,0x46,0xc2,0x49,0xe0,0x8f,0xc7,0x81,0xff,0x99,0x6b,0xec,0x88,0xa2,0xe7,0xeb};
    std::uint8_t ret24[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x46,0xc2,0x49,0xe0,0x8f,0xc7,0x81,0xff,0x99,0x6b,0xec,0x88,0xa2,0xe7,0xeb};
    mont256_from_bytes_ex(&ctx, ret, num24, 16);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret24, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num25[29] = {0x31,0x40,0xe5,0x38,0x19,0x1a,0x18,0xe2,0x34,0x5e,0x39,0xce,0x0e,0x67,0x44,0xbb,0x34,0x57,0xd6,0xc2,0x98,0x92,0xa8,0xa3,0x45,0xa9,0x86,0xe0,0xc6};
    std::uint8_t ret25[32] = {0x00,0x00,0x00,0x31,0x40,0xe5,0x38,0x19,0x1a,0x18,0xe2,0x34,0x5e,0x39,0xce,0x0e,0x67,0x44,0xbb,0x34,0x57,0xd6,0xc2,0x98,0x92,0xa8,0xa3,0x45,0xa9,0x86,0xe0,0xc6};
    mont256_from_bytes_ex(&ctx, ret, num25, 29);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret25, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num26[81] = {0x16,0x70,0x9f,0xe4,0xba,0x75,0xf0,0xea,0x6b,0xc7,0x3c,0x32,0x26,0xc0,0xd5,0xb8,0x5f,0xf4,0x8c,0x11,0x36,0xa3,0xbf,0x83,0x35,0x13,0x78,0xa2,0xae,0x53,0x35,0x11,0xaf,0xc7,0x93,0x9e,0x87,0x41,0x35,0xd5,0xe2,0x2e,0xfe,0x21,0x7f,0x45,0x03,0xa8,0x0e,0x24,0x83,0x92,0x87,0xd1,0xdf,0x44,0x1d,0x6e,0x51,0x41,0xdc,0xcd,0xd5,0x35,0xbf,0x6d,0x04,0xdc,0x53,0x21,0xb9,0xc1,0xa9,0x38,0x9f,0x68,0x2e,0x54,0xb9,0xf3,0x05};
    std::uint8_t ret26[32] = {0x01,0x23,0x11,0x6e,0x42,0x76,0xb2,0xd5,0x8b,0x9b,0xb8,0x62,0xda,0x68,0xc4,0x98,0xbe,0x87,0x0a,0xfd,0xf3,0x7f,0x47,0xeb,0x5a,0x8e,0xe9,0x2b,0xb3,0xb9,0x62,0xee};
    mont256_from_bytes_ex(&ctx, ret, num26, 81);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret26, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num27[81] = {0xda,0x5a,0x7e,0x50,0x9a,0xa0,0xf1,0xd3,0x8b,0x34,0xc7,0xc2,0x38,0x02,0x0b,0x27,0xc4,0xcb,0x7d,0x20,0x38,0xac,0x97,0x34,0xad,0x81,0xe9,0x74,0x81,0x79,0x26,0xea,0x62,0x97,0x4a,0xb8,0x83,0x4a,0x99,0xe4,0x6f,0x57,0xa8,0x96,0x94,0xe9,0x5e,0xb3,0x9a,0xac,0xee,0xf3,0x7d,0x27,0x79,0xaf,0x89,0xb3,0xff,0xa2,0x9e,0x3c,0xe4,0xd8,0xcc,0xed,0x85,0x81,0x85,0x38,0x92,0xa2,0xdd,0xb3,0x38,0xaa,0x50,0x22,0x7b,0xb0,0x6e};
    std::uint8_t ret27[32] = {0x01,0x0b,0xe5,0xd5,0x20,0x23,0x96,0x9e,0xed,0x37,0xca,0x85,0xa1,0x7a,0x86,0xbb,0xf5,0x76,0x68,0xc0,0x6b,0x1f,0x95,0x24,0x1d,0x29,0xb4,0x7e,0xca,0xe9,0xc5,0x41};
    mont256_from_bytes_ex(&ctx, ret, num27, 81);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret27, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num28[75] = {0x2f,0xe6,0x98,0xa2,0xaf,0xd2,0xe3,0x5f,0xab,0x2f,0x62,0x20,0xe1,0x0b,0xc3,0xf0,0x0f,0x51,0xec,0xde,0x7f,0x77,0x08,0x2d,0x70,0xf9,0xc4,0x33,0x46,0x52,0x85,0x7e,0x03,0xf3,0x22,0x03,0xa0,0x2a,0x86,0xc0,0x16,0xb4,0xfc,0x36,0x04,0xea,0xc1,0x4f,0xda,0x8d,0xaa,0x0b,0x15,0xe1,0xd0,0x87,0x12,0x69,0xdd,0x2d,0xdf,0xfb,0x27,0x38,0x82,0x08,0x49,0x6e,0xe5,0xa2,0x52,0x70,0x1c,0x7d,0x1f};
    std::uint8_t ret28[32] = {0x55,0xc3,0xb5,0xb2,0xf6,0x47,0x56,0x20,0x9c,0x55,0x6b,0x7e,0xdf,0xed,0x10,0xa4,0x24,0x6d,0xe9,0x61,0x00,0xa1,0xd6,0xde,0xf9,0xc6,0xb0,0x7f,0x9c,0x4e,0x86,0xc7};
    mont256_from_bytes_ex(&ctx, ret, num28, 75);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret28, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num29[8] = {0x5a,0xff,0x44,0xbf,0x35,0x7c,0x76,0x4b};
    std::uint8_t ret29[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5a,0xff,0x44,0xbf,0x35,0x7c,0x76,0x4b};
    mont256_from_bytes_ex(&ctx, ret, num29, 8);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret29, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num30[74] = {0xe5,0x56,0xd9,0x43,0xae,0x5f,0x72,0x66,0x65,0xb3,0x46,0x6f,0x48,0xae,0x7d,0x0f,0x6b,0xd8,0x2f,0x19,0xf2,0x0f,0x90,0x49,0x57,0xd2,0x77,0xbf,0xf4,0xc5,0x17,0x20,0xcc,0xfe,0xfd,0xbd,0x4c,0xb5,0x9e,0x90,0x98,0x06,0x6a,0x14,0x90,0x02,0x2d,0x7c,0xe4,0x4a,0x50,0xae,0x1d,0x34,0xac,0xe3,0x50,0xfc,0x74,0xba,0x68,0x49,0xd5,0x23,0x42,0x72,0x9d,0x56,0x9f,0x0e,0x67,0x00,0x87,0xfa};
    std::uint8_t ret30[32] = {0xc2,0xac,0x6e,0x6b,0x26,0xcc,0xec,0xb2,0xec,0x83,0x9d,0x8f,0xa8,0xc6,0x28,0xc9,0x20,0x08,0xb7,0x20,0x67,0xbb,0x8d,0x58,0xe0,0xf0,0xcc,0x57,0xc3,0xf1,0x1e,0x19};
    mont256_from_bytes_ex(&ctx, ret, num30, 74);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret30, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num31[75] = {0xe1,0xff,0xd8,0xb6,0x26,0xc5,0xa6,0x10,0xb7,0xaf,0x16,0xa6,0xf4,0xc0,0x4b,0xe6,0x8a,0xa5,0x23,0xd9,0xd4,0xa2,0xf9,0x10,0x22,0xf9,0xa5,0x0f,0x46,0x93,0xcd,0xf0,0x88,0x28,0x7c,0x35,0x5a,0x6e,0x49,0x25,0xb6,0x36,0xdc,0x4b,0xd6,0xf0,0x1d,0x0e,0x89,0xfe,0x90,0xe3,0x31,0x62,0x58,0xe4,0x28,0x28,0x95,0x06,0x1f,0x6d,0x85,0x33,0xff,0x74,0x7b,0x35,0x75,0x2f,0xd2,0xa0,0x22,0xdd,0xba};
    std::uint8_t ret31[32] = {0xca,0x8e,0x73,0x1f,0x83,0xc8,0x1b,0x7a,0xab,0x86,0xc7,0xd0,0xad,0x56,0x3d,0xa2,0xe4,0x8b,0x3a,0xce,0x98,0xe4,0x4d,0x4c,0xb7,0x00,0x70,0x65,0xe9,0xdb,0x6c,0x90};
    mont256_from_bytes_ex(&ctx, ret, num31, 75);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret31, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num32[51] = {0x65,0xdb,0x49,0xd4,0x94,0xf8,0xd4,0x3c,0xc6,0x67,0xad,0x86,0x01,0x29,0x24,0x14,0x3c,0x6c,0xde,0xbd,0xfe,0x7b,0x76,0x65,0x67,0x6e,0x8b,0x29,0x45,0xc7,0x72,0x5c,0x74,0x9b,0xd6,0xdb,0xbf,0xdd,0x18,0xfd,0x7d,0x44,0x1b,0x6a,0x8f,0x18,0xb0,0x8b,0x91,0xaf,0xe9};
    std::uint8_t ret32[32] = {0x6a,0x63,0x28,0x8e,0x39,0xfc,0x67,0x5f,0x66,0x0c,0x2f,0x1f,0xe2,0xdb,0xa0,0x44,0xc4,0xf7,0x1e,0x15,0x63,0x3f,0xae,0x19,0x02,0x51,0x7d,0xa0,0x37,0x90,0x81,0xb7};
    mont256_from_bytes_ex(&ctx, ret, num32, 51);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret32, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num33[7] = {0xca,0x73,0xcb,0x41,0x43,0x3a,0xfe};
    std::uint8_t ret33[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xca,0x73,0xcb,0x41,0x43,0x3a,0xfe};
    mont256_from_bytes_ex(&ctx, ret, num33, 7);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret33, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num34[29] = {0x71,0xf5,0x4d,0x9d,0xe0,0x82,0xf3,0xf4,0x13,0x08,0xc4,0xfa,0xd0,0x82,0xd3,0x08,0x4d,0x21,0xb6,0x16,0x58,0x5c,0xcd,0x2f,0xaa,0xc0,0xfa,0xfe,0x17};
    std::uint8_t ret34[32] = {0x00,0x00,0x00,0x71,0xf5,0x4d,0x9d,0xe0,0x82,0xf3,0xf4,0x13,0x08,0xc4,0xfa,0xd0,0x82,0xd3,0x08,0x4d,0x21,0xb6,0x16,0x58,0x5c,0xcd,0x2f,0xaa,0xc0,0xfa,0xfe,0x17};
    mont256_from_bytes_ex(&ctx, ret, num34, 29);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret34, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num35[6] = {0x5a,0x6b,0x26,0xf0,0x1f,0xf4};
    std::uint8_t ret35[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5a,0x6b,0x26,0xf0,0x1f,0xf4};
    mont256_from_bytes_ex(&ctx, ret, num35, 6);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret35, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num36[72] = {0x84,0x9d,0x2b,0x9a,0x13,0x9d,0x76,0x3c,0x1b,0x9f,0x05,0x5d,0x6b,0x24,0x30,0xa5,0xb4,0x80,0x52,0x5b,0x24,0x50,0xa4,0x55,0x7c,0x9d,0xd0,0x87,0x3a,0x7a,0x58,0x79,0xc7,0x2d,0x7a,0xb0,0xdf,0x1b,0xcb,0x60,0x60,0x65,0x09,0x37,0x7f,0x91,0x66,0xe6,0x40,0x23,0x30,0x54,0x39,0xd8,0xbc,0xd5,0x86,0xa5,0xa5,0x58,0x93,0x30,0xd8,0xee,0xf1,0xca,0xaa,0xa6,0x34,0x43,0x69,0x4a};
    std::uint8_t ret36[32] = {0x02,0xb2,0xb5,0x9f,0x2e,0xca,0x85,0x83,0x69,0xba,0xb8,0x61,0x6d,0x33,0x8d,0xeb,0xbf,0x23,0xa5,0xd3,0xb0,0x6b,0x42,0x6b,0x0b,0x7a,0x20,0x57,0x79,0xc9,0x9e,0x8e};
    mont256_from_bytes_ex(&ctx, ret, num36, 72);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret36, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num37[18] = {0xb1,0x75,0x60,0xc1,0x1c,0x75,0xca,0x48,0x13,0xbc,0x5b,0x7b,0xd9,0xeb,0xe6,0x0f,0x0a,0x19};
    std::uint8_t ret37[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb1,0x75,0x60,0xc1,0x1c,0x75,0xca,0x48,0x13,0xbc,0x5b,0x7b,0xd9,0xeb,0xe6,0x0f,0x0a,0x19};
    mont256_from_bytes_ex(&ctx, ret, num37, 18);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret37, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num38[38] = {0x2a,0xf7,0x29,0xaa,0x4b,0xbf,0xb5,0x73,0x1d,0x29,0x57,0xb4,0x5b,0x65,0x58,0xfa,0x8c,0x66,0x09,0xb7,0x5f,0x91,0x10,0x7d,0xca,0xbc,0x6a,0xf9,0x60,0x03,0x57,0xb8,0x4c,0x1e,0x15,0xee,0x67,0x30};
    std::uint8_t ret38[32] = {0xdf,0x1d,0x93,0xdf,0x57,0xb4,0x5b,0x65,0x58,0xfa,0x8c,0x66,0x09,0xb7,0x8a,0x88,0x3a,0x28,0x16,0x7b,0x41,0x4e,0xe9,0x4d,0x57,0xb8,0x77,0x15,0x3f,0x98,0xdd,0xe6};
    mont256_from_bytes_ex(&ctx, ret, num38, 38);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret38, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num39[54] = {0x1e,0x8a,0x55,0xd8,0xdc,0x31,0xa3,0xbb,0x48,0xea,0xfb,0x44,0x5f,0xce,0x75,0x3b,0x99,0x7b,0x4e,0x82,0xde,0xfc,0x12,0x67,0x78,0x8f,0x5b,0x43,0x44,0xea,0x5d,0xfc,0x2f,0xf0,0x52,0xfe,0x17,0x49,0xa4,0xa2,0x24,0x4d,0xef,0x43,0x27,0x61,0xbf,0x6f,0x85,0x84,0x33,0x3b,0x3e,0x52};
    std::uint8_t ret39[32] = {0x20,0xd7,0x8f,0x37,0xfe,0xfe,0x8d,0xd5,0x59,0x40,0xae,0x49,0x1e,0x12,0xab,0x80,0xec,0xb9,0x65,0x7b,0x2b,0x84,0x90,0x60,0x29,0x83,0xc2,0x74,0xeb,0xd2,0x78,0xc9};
    mont256_from_bytes_ex(&ctx, ret, num39, 54);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret39, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num40[19] = {0x41,0x8f,0x16,0x4e,0xd1,0x89,0xaa,0x20,0x32,0xc0,0x71,0xac,0x46,0x10,0x05,0xd5,0x56,0x38,0x7e};
    std::uint8_t ret40[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x8f,0x16,0x4e,0xd1,0x89,0xaa,0x20,0x32,0xc0,0x71,0xac,0x46,0x10,0x05,0xd5,0x56,0x38,0x7e};
    mont256_from_bytes_ex(&ctx, ret, num40, 19);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret40, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num41[70] = {0x5f,0x3e,0xdc,0xa5,0xc3,0xc3,0x27,0x29,0x23,0x87,0x27,0x72,0x19,0x9f,0xec,0x65,0x54,0xf4,0x8b,0x9e,0x2e,0x78,0x96,0x7c,0x7d,0xc9,0xa9,0xdc,0xce,0xea,0x49,0x51,0xeb,0x60,0xe7,0xaa,0xa9,0x51,0xfa,0x1f,0xc0,0xe3,0xb9,0x9d,0x57,0xec,0x4b,0x6f,0x05,0x66,0x2f,0x84,0x34,0x3a,0x51,0x68,0xdc,0xa4,0x1c,0xfa,0x7d,0x7d,0x8b,0x6e,0xee,0x04,0x3a,0x23,0xbd,0xd0};
    std::uint8_t ret41[32] = {0x92,0x75,0x91,0x7f,0x58,0x00,0xf9,0xa2,0x34,0x1b,0xac,0xf5,0x43,0x8d,0xdb,0x4f,0x18,0x86,0x82,0x4d,0xfb,0x7f,0xf7,0xf5,0xe3,0xa0,0xc9,0x17,0x43,0x0b,0xba,0x2b};
    mont256_from_bytes_ex(&ctx, ret, num41, 70);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret41, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num42[16] = {0x6e,0x72,0x0e,0xc7,0x32,0x15,0x92,0xf5,0x00,0x37,0xd2,0xe7,0x36,0x07,0x0c,0xae};
    std::uint8_t ret42[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x72,0x0e,0xc7,0x32,0x15,0x92,0xf5,0x00,0x37,0xd2,0xe7,0x36,0x07,0x0c,0xae};
    mont256_from_bytes_ex(&ctx, ret, num42, 16);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret42, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num43[74] = {0xfa,0x2c,0x55,0xdd,0x19,0xb6,0x93,0xb7,0xff,0x8c,0x8c,0x76,0xa0,0x28,0x00,0x7c,0x0f,0xe8,0x87,0xd8,0xdd,0x00,0xae,0xad,0x8b,0x53,0xdb,0xdd,0x59,0xb1,0x0d,0x51,0x6f,0x13,0x7a,0x23,0x0e,0x99,0x8b,0x60,0x03,0x74,0x18,0x1e,0x50,0xfc,0x2d,0xf6,0x6a,0x98,0x11,0xea,0xbe,0x5d,0xf4,0x18,0x56,0x04,0x08,0xfa,0xe4,0x1c,0x15,0x5c,0x85,0xed,0x25,0x72,0x49,0x95,0xf9,0x3f,0x96,0x61};
    std::uint8_t ret43[32] = {0x6c,0x4e,0x6c,0x70,0x14,0x14,0x87,0x55,0xaa,0x16,0x62,0x72,0xc7,0x82,0xc8,0x20,0x78,0x4d,0x6b,0x21,0x48,0x0f,0x65,0x78,0x02,0x3b,0x1e,0x57,0xd2,0xd8,0x59,0x33};
    mont256_from_bytes_ex(&ctx, ret, num43, 74);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret43, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num44[40] = {0x43,0xda,0x30,0xa3,0x9b,0xed,0xb8,0xbc,0xd3,0x7f,0x15,0x2a,0xd4,0xec,0xb6,0x71,0x99,0xf0,0x8b,0x98,0xb4,0xa1,0x80,0xcf,0x19,0xdc,0x89,0xb1,0xc1,0xe4,0xce,0x3f,0xa4,0xe4,0x1c,0xcf,0x49,0x47,0x85,0xea};
    std::uint8_t ret44[32] = {0xb3,0x46,0xfe,0x8a,0xd4,0xec,0xb6,0x71,0x99,0xf0,0x8b,0x98,0xf8,0x7b,0xb1,0x72,0xb5,0xca,0x42,0x6d,0xe2,0x1c,0xe4,0xdf,0xe8,0xbe,0x4d,0x73,0x29,0x0f,0x6f,0x4a};
    mont256_from_bytes_ex(&ctx, ret, num44, 40);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret44, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num45[72] = {0x34,0x95,0x67,0x21,0x70,0x27,0xe5,0x02,0xfb,0x49,0xfd,0x4d,0xcd,0xd9,0x3c,0x06,0xf5,0x97,0xff,0x4b,0x33,0xa5,0xd6,0x98,0x38,0x65,0xeb,0x3f,0x13,0x98,0x97,0xdc,0xa7,0xc0,0x75,0x50,0x03,0xd6,0x89,0x14,0x92,0x5a,0xfe,0x70,0x2d,0x1e,0x87,0xc1,0x68,0x67,0x45,0xbb,0x52,0x3c,0xea,0x0a,0xd1,0x85,0xcc,0x7f,0x4c,0x05,0x97,0xe5,0x7e,0x61,0x5b,0x17,0x1a,0xba,0x6b,0x37};
    std::uint8_t ret45[32] = {0x66,0x1c,0x9a,0x84,0x43,0x8c,0xdd,0x7c,0xda,0xc2,0x5f,0xaa,0xc8,0x1f,0xc5,0x01,0xe3,0xf3,0x33,0xc4,0x03,0xaa,0xaa,0xe8,0xab,0xb4,0x9b,0x7a,0xe6,0x39,0x80,0x1f};
    mont256_from_bytes_ex(&ctx, ret, num45, 72);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret45, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num46[88] = {0x04,0x42,0x38,0x71,0x9f,0xf7,0x40,0x9a,0x9f,0xec,0xe7,0x6a,0x43,0x9b,0xbc,0xc6,0x43,0x9b,0xac,0x1a,0x87,0x1a,0x84,0x6d,0x22,0x19,0x4d,0xe3,0x80,0x47,0x4e,0x42,0x83,0x66,0xb4,0xbd,0xc2,0xb8,0x6e,0x4f,0xbb,0x76,0xee,0x38,0xcb,0x88,0xcb,0x66,0xe5,0x16,0x3f,0xf6,0x17,0xba,0x8a,0x30,0xf4,0xbf,0x39,0xf9,0x24,0x7b,0xcd,0xfb,0x8e,0xd0,0x15,0x32,0x53,0x24,0xcd,0x33,0x20,0x71,0x77,0x13,0xd9,0x04,0x04,0xd2,0xee,0x72,0xf0,0x12,0x3e,0x5a,0x03,0xb9};
    std::uint8_t ret46[32] = {0x11,0xa0,0xe5,0xf7,0xe8,0x75,0x23,0xea,0xa8,0x6f,0x80,0xaa,0xd2,0x9e,0x93,0xfa,0x93,0xf6,0xc4,0xcb,0xce,0xa2,0x0b,0x7c,0x0e,0x42,0x39,0x89,0x97,0xe3,0x07,0x8d};
    mont256_from_bytes_ex(&ctx, ret, num46, 88);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret46, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num47[24] = {0x08,0x88,0xb3,0x99,0xd0,0xd4,0xa9,0x5a,0xfa,0x07,0x71,0x38,0x2e,0xb2,0xfa,0x41,0xa1,0xb7,0x45,0x4b,0xf6,0x44,0x30,0xb6};
    std::uint8_t ret47[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x88,0xb3,0x99,0xd0,0xd4,0xa9,0x5a,0xfa,0x07,0x71,0x38,0x2e,0xb2,0xfa,0x41,0xa1,0xb7,0x45,0x4b,0xf6,0x44,0x30,0xb6};
    mont256_from_bytes_ex(&ctx, ret, num47, 24);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret47, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num48[14] = {0x2b,0xbc,0xd2,0x58,0x99,0x04,0xd0,0xc3,0xfd,0x58,0xb7,0xca,0x00,0xa4};
    std::uint8_t ret48[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2b,0xbc,0xd2,0x58,0x99,0x04,0xd0,0xc3,0xfd,0x58,0xb7,0xca,0x00,0xa4};
    mont256_from_bytes_ex(&ctx, ret, num48, 14);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret48, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num49[75] = {0x7e,0x9c,0x3f,0x2b,0x0f,0x59,0x89,0xb3,0xf5,0x28,0x29,0xf8,0x64,0xce,0x43,0x90,0xc7,0xe2,0x23,0xf3,0x27,0xb7,0x94,0x91,0xe6,0x79,0x29,0xb6,0xd8,0xda,0xe7,0x33,0x9f,0x45,0xc4,0xab,0x11,0x8d,0x53,0xd7,0x2e,0x1e,0xb0,0x20,0xdd,0x82,0xda,0x12,0x0f,0x1b,0x9a,0x78,0x6a,0xca,0xab,0x94,0x2f,0xe5,0x64,0xd7,0x90,0x5f,0x9b,0x2f,0xae,0x12,0x64,0x3f,0xf6,0xe5,0x02,0x3e,0xc3,0x04,0x3b};
    std::uint8_t ret49[32] = {0x78,0x16,0xdf,0xb4,0xe5,0x8c,0xed,0x06,0x01,0x43,0x9d,0x21,0x14,0xe3,0x3f,0x87,0x06,0x01,0xe8,0x04,0x1d,0xef,0x1c,0xad,0x57,0xfa,0xf2,0x7d,0x01,0x1e,0xa2,0x2c};
    mont256_from_bytes_ex(&ctx, ret, num49, 75);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret49, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num50[74] = {0x40,0x09,0x92,0x5b,0x41,0x3b,0x50,0xc2,0x94,0xb1,0xad,0xe9,0xd2,0x43,0x06,0x00,0xd0,0xd3,0x7e,0x40,0xe3,0xba,0xe7,0x8b,0x8d,0xe9,0x63,0xa7,0xd5,0x66,0x2a,0x91,0xef,0xc9,0x6c,0xfe,0x8b,0x86,0x1b,0x0a,0x19,0xae,0x52,0x59,0x6f,0x61,0x56,0xd4,0x26,0x58,0xf3,0x77,0xef,0x3d,0xac,0x41,0x56,0x46,0x9d,0x94,0xfb,0x41,0x80,0x6c,0x16,0xcd,0x2e,0x08,0xc2,0x11,0x5b,0x10,0x36,0x9b};
    std::uint8_t ret50[32] = {0xfb,0x23,0x6f,0xea,0xa2,0x47,0x49,0x7d,0xe1,0x3d,0xce,0x25,0x40,0xcc,0xdf,0xdb,0x5d,0x99,0x64,0xb7,0xfe,0xa7,0xe5,0xc6,0x4f,0x7a,0xb7,0xd3,0xf8,0xeb,0x7f,0xc6};
    mont256_from_bytes_ex(&ctx, ret, num50, 74);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret50, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num51[82] = {0xbf,0x18,0xee,0x04,0x0d,0xb7,0x70,0xab,0x31,0xbb,0x13,0xf0,0xad,0x40,0xb9,0x60,0x60,0xda,0x04,0x92,0x9c,0xcb,0xd7,0x56,0x65,0xb9,0x1f,0x47,0x80,0x01,0x9d,0x4d,0xf1,0x00,0xc7,0x61,0x8a,0x92,0xe5,0x2b,0x78,0xcc,0xf1,0x12,0x92,0xea,0xb4,0x81,0xb3,0x23,0x31,0x7d,0x53,0xb0,0x34,0xe7,0x2a,0x21,0x04,0xa6,0xfa,0xae,0x91,0x02,0x26,0xd3,0xc5,0x2f,0x39,0x88,0xc7,0x5e,0xf7,0x28,0x5c,0xe5,0xb0,0x45,0x0b,0x9e,0x3d,0x78};
    std::uint8_t ret51[32] = {0x9b,0x2a,0xb3,0xcf,0x99,0x9c,0xbe,0x59,0xd2,0xf7,0x5b,0xa3,0xf1,0x30,0xc4,0x0d,0xdb,0x8c,0x4e,0x5e,0x2d,0xdb,0xd3,0x7b,0x74,0x49,0xd8,0xf9,0x93,0x77,0xd7,0xb2};
    mont256_from_bytes_ex(&ctx, ret, num51, 82);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret51, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num52[25] = {0x51,0x6b,0x83,0x92,0xde,0x96,0x3a,0x92,0x17,0xc5,0xb2,0xe3,0xee,0x8a,0xa1,0xae,0x2f,0x68,0x47,0xe7,0x16,0x2c,0x6a,0x50,0x1b};
    std::uint8_t ret52[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x51,0x6b,0x83,0x92,0xde,0x96,0x3a,0x92,0x17,0xc5,0xb2,0xe3,0xee,0x8a,0xa1,0xae,0x2f,0x68,0x47,0xe7,0x16,0x2c,0x6a,0x50,0x1b};
    mont256_from_bytes_ex(&ctx, ret, num52, 25);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret52, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num53[48] = {0x28,0xb3,0xed,0x1a,0x23,0xcf,0x6f,0x5e,0x5a,0xa1,0x3b,0x33,0xfd,0x4a,0xa7,0xf9,0xe5,0x2f,0x59,0xe3,0x5f,0xce,0xd0,0xfd,0x23,0x8a,0x58,0x6e,0x24,0x89,0x5f,0xf0,0x2e,0xf7,0x35,0xdf,0x57,0x09,0xc9,0xd7,0x68,0x61,0x49,0x0e,0xf4,0x64,0x1b,0x7e};
    std::uint8_t ret53[32] = {0x89,0x9e,0x99,0x89,0x88,0x82,0xbe,0x17,0x47,0x59,0xc7,0xcc,0x7f,0x2a,0x9b,0x24,0x54,0xf5,0xca,0xf2,0xff,0x1d,0xe6,0xaa,0x0f,0x85,0xe0,0xbb,0x98,0xd3,0x5b,0x24};
    mont256_from_bytes_ex(&ctx, ret, num53, 48);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret53, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num54[13] = {0xb8,0xa2,0x23,0xd3,0xc9,0x10,0xc2,0x2e,0xe0,0xa9,0x59,0x03,0x21};
    std::uint8_t ret54[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0xa2,0x23,0xd3,0xc9,0x10,0xc2,0x2e,0xe0,0xa9,0x59,0x03,0x21};
    mont256_from_bytes_ex(&ctx, ret, num54, 13);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret54, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num55[71] = {0xb0,0xfc,0xb6,0xdc,0xdd,0x96,0x64,0x24,0x9c,0xbd,0x8a,0x6e,0x73,0x9e,0x01,0x6e,0x38,0x7c,0xa3,0xd0,0xb4,0x1d,0x84,0xec,0x1c,0x26,0x5a,0x3e,0xf9,0x0a,0xc2,0x7c,0xba,0xe9,0xbb,0xdf,0x0c,0x9a,0x0c,0x2e,0x8c,0x6e,0x6c,0xa3,0x8e,0x13,0x3a,0xdc,0x67,0x86,0x01,0xbe,0x72,0x4c,0x9c,0xcb,0x1e,0x34,0x21,0x8b,0xbb,0xbd,0x73,0xf8,0x04,0xbe,0x87,0xa1,0xe5,0xf0,0x39};
    std::uint8_t ret55[32] = {0xf5,0x9c,0x12,0x1d,0xdd,0x26,0xbe,0xa0,0x1e,0xd4,0xb9,0x99,0x5a,0x8e,0x56,0x97,0x6f,0x28,0x20,0x30,0x75,0x08,0x8f,0x35,0xc0,0xb0,0x4d,0x8d,0x95,0x65,0x29,0x09};
    mont256_from_bytes_ex(&ctx, ret, num55, 71);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret55, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num56[92] = {0x08,0xe9,0x66,0x6a,0x2d,0x41,0x7a,0xf7,0x92,0xa0,0xc1,0xbc,0x94,0x7a,0xc7,0x98,0x57,0x33,0x00,0x19,0x40,0x91,0x1c,0x62,0x33,0x95,0x3f,0x0e,0xe9,0x24,0x52,0xb4,0xa5,0x54,0x81,0x98,0xb8,0xda,0xe7,0xc6,0x07,0x5d,0x30,0xac,0x3b,0xd4,0x84,0x58,0x1a,0x84,0x9f,0xcc,0xd6,0x31,0xe6,0x11,0x64,0xcc,0x9e,0xd7,0xcc,0xde,0xc5,0x60,0xb1,0xf3,0x15,0xd1,0xc6,0xcd,0x39,0x14,0x24,0x18,0x89,0x8a,0x69,0xdc,0x56,0x87,0xd8,0x3a,0x4c,0xc4,0xe8,0xac,0x1c,0x6d,0xde,0x7f,0x32,0xed};
    std::uint8_t ret56[32] = {0xa3,0x99,0xbe,0xba,0xc9,0x2d,0x2a,0x96,0x75,0x11,0x8d,0x12,0xb8,0x1b,0x98,0x5a,0xea,0xc2,0x9a,0xdf,0xb7,0x8b,0xb9,0xc0,0xc1,0x63,0xf3,0x61,0xc1,0x07,0x19,0x9c};
    mont256_from_bytes_ex(&ctx, ret, num56, 92);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret56, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num57[9] = {0x19,0xee,0x4e,0xe7,0x89,0x5f,0x3d,0xfb,0x79};
    std::uint8_t ret57[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0xee,0x4e,0xe7,0x89,0x5f,0x3d,0xfb,0x79};
    mont256_from_bytes_ex(&ctx, ret, num57, 9);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret57, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num58[73] = {0x81,0xe1,0x17,0xa6,0x61,0x93,0x74,0x92,0x51,0xda,0x60,0x2d,0xbc,0x87,0xaa,0xa7,0x9c,0xb3,0x17,0xa1,0x51,0x9d,0x36,0x75,0xde,0x2e,0x20,0x43,0x89,0x03,0x37,0x66,0xb2,0x9c,0xa0,0x46,0xc7,0xa7,0x13,0x81,0x48,0x06,0x0e,0x94,0x2d,0x6c,0x2e,0x4f,0x14,0x6a,0x1f,0x58,0xd9,0x3e,0x1f,0xe1,0x7c,0x7a,0xfb,0x7a,0x0d,0x95,0xa4,0xba,0x50,0xab,0x44,0x6b,0xad,0x3a,0x4f,0xe9,0x00};
    std::uint8_t ret58[32] = {0x4e,0x8c,0x40,0x65,0x04,0x5a,0x33,0x7d,0xd1,0x65,0x9e,0x2c,0x4b,0x7f,0x43,0x66,0x13,0x44,0x78,0xda,0xc1,0x8a,0xc8,0xb8,0x57,0xd0,0x38,0x62,0xb5,0x93,0x12,0x06};
    mont256_from_bytes_ex(&ctx, ret, num58, 73);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret58, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num59[8] = {0x68,0x3d,0x07,0x22,0x63,0x64,0x43,0x71};
    std::uint8_t ret59[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x3d,0x07,0x22,0x63,0x64,0x43,0x71};
    mont256_from_bytes_ex(&ctx, ret, num59, 8);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret59, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num60[80] = {0x47,0x1c,0x72,0xaa,0xa5,0xb3,0x70,0xd9,0x08,0xf6,0x41,0xb5,0x02,0x52,0x33,0x24,0x92,0x96,0xb9,0xe5,0x14,0xe9,0x28,0xc7,0x3a,0xe1,0x33,0x81,0x66,0x66,0xd9,0xbe,0x0b,0xf7,0x8e,0x0a,0x00,0x4d,0x26,0xe1,0x5c,0xb2,0xf7,0x37,0x69,0xf4,0xf3,0x73,0x70,0xed,0x77,0x5e,0x5a,0xc0,0xf1,0x5b,0x7c,0x15,0x6a,0x34,0xba,0x46,0xc1,0x9e,0x8c,0x00,0x0e,0xe4,0x44,0xc4,0x1e,0x5b,0x78,0x2e,0x0d,0x7e,0x21,0x46,0x15,0x87};
    std::uint8_t ret60[32] = {0x67,0xda,0xb2,0xc8,0x96,0xdb,0xd2,0xe9,0xc3,0x12,0x80,0x8e,0x9f,0x6b,0xe7,0x03,0x5a,0xae,0xa0,0x6b,0x53,0xa3,0x76,0x4e,0x32,0x6d,0x2b,0x07,0x1e,0x27,0x23,0x3b};
    mont256_from_bytes_ex(&ctx, ret, num60, 80);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret60, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num61[27] = {0x8d,0x33,0x24,0xe4,0xdc,0x1a,0xdc,0x5b,0x29,0x48,0x28,0xc3,0xe8,0x7d,0x00,0xa8,0x10,0xbc,0x25,0x47,0x70,0x55,0x36,0x63,0x63,0xfe,0x4c};
    std::uint8_t ret61[32] = {0x00,0x00,0x00,0x00,0x00,0x8d,0x33,0x24,0xe4,0xdc,0x1a,0xdc,0x5b,0x29,0x48,0x28,0xc3,0xe8,0x7d,0x00,0xa8,0x10,0xbc,0x25,0x47,0x70,0x55,0x36,0x63,0x63,0xfe,0x4c};
    mont256_from_bytes_ex(&ctx, ret, num61, 27);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret61, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num62[64] = {0x6e,0x75,0x2a,0xbe,0xd8,0x5d,0x2a,0xb1,0xf0,0x2a,0xfc,0x44,0xac,0x60,0xb9,0xf9,0xf6,0xa7,0x05,0xd6,0x88,0x61,0x4a,0x2e,0xab,0x20,0x87,0x5d,0xce,0x64,0x69,0xee,0xe3,0x7e,0x94,0xc0,0x35,0x03,0x31,0xd9,0x26,0x70,0xf2,0xa7,0x6a,0x07,0x42,0x8a,0x87,0xaa,0x14,0x66,0x44,0xc6,0xe3,0x13,0x31,0xb9,0x81,0xd5,0x81,0x34,0x52,0x58};
    std::uint8_t ret62[32] = {0x11,0x3d,0x18,0x31,0x72,0x7c,0x8d,0x21,0x54,0x44,0xb9,0x4a,0xd0,0xe3,0x00,0x4a,0x20,0x3e,0x8c,0x21,0x02,0xb9,0xca,0xcf,0x86,0x12,0xba,0x59,0x94,0x1c,0xf1,0x10};
    mont256_from_bytes_ex(&ctx, ret, num62, 64);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret62, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num63[88] = {0xd5,0x7f,0x4a,0x2c,0x13,0x4f,0x67,0x6e,0x9e,0x38,0x7e,0xe2,0x9d,0xbf,0xb6,0x0e,0x5a,0xbf,0xb7,0x9e,0x99,0x61,0x30,0x90,0xae,0x16,0x51,0x75,0x12,0x99,0x8c,0x77,0xa4,0xe1,0x52,0xdd,0x94,0xd3,0xdf,0x9d,0xd3,0x8f,0x06,0xa3,0x41,0xb9,0x63,0x2f,0xbe,0x50,0x68,0x52,0xf0,0x9a,0xed,0x9d,0x16,0x90,0x24,0x36,0xe4,0x1d,0x4e,0xa1,0x57,0xea,0xf6,0x57,0xe3,0x3d,0x1f,0x41,0x85,0x95,0x5f,0x80,0x3c,0xde,0x56,0x34,0x7d,0x99,0xa7,0x7f,0xbf,0x04,0x9c,0x08};
    std::uint8_t ret63[32] = {0xc7,0x08,0xd7,0xeb,0x0e,0x32,0xdd,0xa6,0xf8,0x90,0x29,0x38,0x23,0x07,0xaa,0x34,0x97,0x4f,0xe4,0x15,0x57,0x12,0xea,0xbc,0xae,0xc0,0xe6,0xf0,0xe7,0x4e,0x35,0x17};
    mont256_from_bytes_ex(&ctx, ret, num63, 88);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret63, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num64[69] = {0xef,0x95,0x4d,0xe2,0x94,0x66,0x70,0xa8,0xf6,0xc1,0xb5,0xce,0xce,0x45,0x05,0xce,0xb4,0x20,0x4e,0x81,0x12,0x50,0xee,0xc6,0x24,0x12,0xd3,0x82,0xc4,0x4b,0xa5,0x35,0x08,0xe8,0x14,0xb8,0x25,0x2d,0xff,0x05,0x88,0xe1,0x50,0x98,0x72,0x27,0x75,0x10,0x06,0xd8,0x1b,0x71,0xc6,0x11,0x10,0x00,0xfd,0x29,0xcc,0xbe,0xeb,0x95,0xfb,0xee,0xa0,0x6c,0x0c,0xcf,0x4d};
    std::uint8_t ret64[32] = {0x9c,0x19,0x03,0x9b,0x85,0x01,0x9c,0x73,0xa3,0x33,0x65,0xbf,0x08,0x3f,0x22,0x8b,0xdc,0x7d,0xc0,0x11,0x5a,0x09,0x4f,0xc8,0x25,0xa0,0x73,0xd9,0xbe,0x19,0xbe,0xe3};
    mont256_from_bytes_ex(&ctx, ret, num64, 69);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret64, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num65[55] = {0xbd,0x01,0x9a,0x88,0x76,0x0f,0xb7,0xad,0xeb,0x2d,0xd4,0x6d,0x89,0xfc,0x61,0xd6,0x6f,0xdc,0xae,0x81,0x79,0x42,0x04,0x3e,0xab,0x77,0x37,0x5e,0x29,0xd9,0xb6,0x94,0x2d,0xc7,0x57,0x4f,0xa8,0x59,0xe1,0xfd,0x72,0xec,0xf1,0xde,0x81,0xf2,0xa2,0x89,0x9d,0x63,0x9c,0xd2,0xc6,0xe7,0xba};
    std::uint8_t ret65[32] = {0xc4,0x6f,0xe2,0xc4,0x0c,0x15,0x07,0x8b,0x02,0x74,0xc5,0x53,0xaf,0x4b,0x47,0xe2,0xb6,0xc7,0x6f,0xb6,0x85,0xdb,0xd2,0x56,0x04,0xb5,0x7b,0xd3,0xd0,0x15,0x43,0x8f};
    mont256_from_bytes_ex(&ctx, ret, num65, 55);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret65, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num66[100] = {0x41,0x10,0x3d,0xa8,0x45,0x29,0xb1,0xb2,0xe4,0xa2,0x5c,0xcc,0x81,0x1b,0x0f,0x34,0x90,0x4c,0xf0,0xf9,0xc3,0x1a,0xf1,0xe6,0x7b,0xce,0xd6,0x11,0x1a,0xc7,0x11,0xba,0x11,0x36,0x1e,0x2c,0x80,0x33,0x1f,0x14,0xfa,0x55,0xd9,0x5b,0xdc,0xf9,0x55,0x2f,0x4f,0x9e,0x82,0xcf,0x0e,0xee,0x3c,0x22,0x41,0xfa,0x56,0xf1,0x6b,0x3a,0x1c,0x6f,0xa5,0x07,0x1f,0x28,0x08,0x1e,0x68,0xf7,0x60,0x89,0xba,0x1f,0x5a,0x4c,0x15,0x79,0x97,0x95,0xc2,0xa9,0x3c,0x56,0xa9,0x0d,0x36,0x37,0x12,0x7f,0x6e,0x84,0xcc,0xf5,0x1a,0x80,0x74,0x44};
    std::uint8_t ret66[32] = {0xbd,0x3e,0xc0,0x73,0xd7,0x93,0x0e,0xe7,0x12,0x9b,0xd9,0x85,0x16,0x7e,0x4e,0x0e,0x4b,0xb8,0xa8,0x81,0xdd,0xaa,0xfa,0x1c,0x6a,0x48,0xd5,0x70,0x59,0x67,0xb1,0x70};
    mont256_from_bytes_ex(&ctx, ret, num66, 100);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret66, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num67[41] = {0x73,0x4f,0x74,0xd4,0x3c,0x37,0x0d,0x7b,0x94,0xc5,0x8e,0xaf,0xb1,0x37,0x2c,0x88,0x31,0xd0,0xc8,0x93,0x6c,0x2e,0xfb,0x00,0x05,0x5c,0xcb,0xf2,0xab,0xf7,0x92,0xb8,0x0b,0xaa,0x4c,0x72,0xed,0x3c,0x0e,0x21,0x81};
    std::uint8_t ret67[32] = {0x4c,0x10,0xff,0xf5,0x37,0x2c,0x88,0x31,0xd0,0xc8,0x93,0xdf,0x7e,0x6f,0xd4,0x41,0x93,0xd9,0x6e,0x40,0x71,0x10,0x68,0x3a,0xf9,0xc1,0x47,0x9c,0xc2,0x90,0x71,0xc5};
    mont256_from_bytes_ex(&ctx, ret, num67, 41);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret67, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num68[60] = {0x93,0x23,0xe1,0xb2,0xde,0x2e,0x6a,0x26,0x79,0x79,0x9f,0x3f,0x7b,0x5c,0xc1,0x92,0x7a,0x0e,0x8d,0xef,0x71,0x6f,0xc0,0xba,0xcb,0x7a,0x8d,0x11,0xa0,0x43,0x18,0x6a,0xaf,0x09,0x63,0xb8,0x3c,0xe9,0x5e,0xae,0x85,0x96,0xb5,0x64,0x45,0xb3,0xbb,0x1b,0xbd,0x81,0x4f,0x32,0xf8,0x0d,0x75,0x99,0x47,0x48,0xc1,0xf4};
    std::uint8_t ret68[32] = {0xa8,0x30,0x8b,0xeb,0xbd,0x8a,0x06,0xfe,0x28,0x4a,0x38,0x78,0x74,0xf6,0x42,0xeb,0x55,0x85,0x5e,0xff,0x0f,0x44,0xb5,0x8d,0xdc,0xd8,0x52,0xa2,0xd5,0xbc,0x96,0x35};
    mont256_from_bytes_ex(&ctx, ret, num68, 60);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret68, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num69[75] = {0x3f,0x5c,0x04,0x07,0x6d,0xdd,0xbd,0x20,0xc1,0x64,0x23,0xbc,0x47,0xc2,0x75,0x5c,0x06,0x48,0x47,0x18,0x6b,0x0e,0x88,0x48,0x9b,0x6b,0xbf,0x72,0x66,0x9d,0x7e,0x18,0xbb,0x20,0x8d,0x86,0x5f,0x76,0xb3,0x64,0xab,0xc3,0x0c,0x44,0x52,0x2e,0xdc,0xf9,0x5e,0xad,0xce,0x14,0xa5,0x81,0x1c,0xac,0x28,0x7c,0x2a,0xca,0x46,0x5e,0xd5,0x3d,0x97,0x4d,0x6b,0xf6,0x65,0xa9,0x4f,0xac,0x8f,0x35,0x86};
    std::uint8_t ret69[32] = {0x1a,0xc4,0x3a,0x3f,0xcd,0x43,0x58,0x11,0x43,0x4e,0xd3,0x51,0x3f,0xab,0xd1,0x90,0xac,0xa3,0x88,0x9e,0xad,0xbf,0x89,0x32,0xf2,0x53,0x3f,0x5e,0x4e,0x41,0x97,0x12};
    mont256_from_bytes_ex(&ctx, ret, num69, 75);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret69, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num70[59] = {0xac,0x48,0x72,0xf7,0x4a,0x95,0xc6,0x1d,0x45,0xee,0xb6,0x00,0x62,0x8f,0x7c,0x02,0xaa,0x71,0x5f,0xcd,0x18,0xbd,0xbe,0xd0,0x8d,0x95,0xd4,0xdb,0x80,0x1f,0xbd,0x8b,0xe5,0xe8,0x7e,0xd3,0x49,0x60,0xad,0x4a,0x10,0xf6,0x7a,0x0e,0x73,0x4c,0x15,0x94,0xce,0x82,0x58,0x54,0x12,0x31,0xf5,0x23,0x85,0xdb,0x45};
    std::uint8_t ret70[32] = {0xa6,0xad,0x0e,0x0a,0x8c,0xf4,0xc0,0x6d,0xcd,0xea,0xb0,0x46,0x2d,0x12,0xc9,0x9a,0xeb,0xea,0xd4,0x1a,0xff,0x31,0x50,0x8c,0x3a,0x21,0x05,0xf1,0xd1,0x6c,0xda,0xdc};
    mont256_from_bytes_ex(&ctx, ret, num70, 59);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret70, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num71[47] = {0x03,0x8e,0xce,0x1a,0x02,0x08,0x3e,0x43,0x08,0xde,0x2a,0x90,0x66,0x12,0xbb,0xd3,0xa5,0x81,0xee,0x2c,0x6c,0x0e,0x26,0x22,0xf5,0x32,0x02,0x8d,0x08,0xb0,0xa8,0x6c,0xb7,0x60,0xb0,0x15,0xc2,0x2b,0x1e,0x9a,0x6e,0x32,0x41,0xb0,0xe9,0x17,0xdb};
    std::uint8_t ret71[32] = {0xc1,0x1a,0x09,0xe0,0x2c,0x6f,0x9c,0xf4,0x3c,0xf7,0x3a,0x40,0xd0,0x11,0x8e,0xd2,0xfd,0x21,0x02,0x39,0x42,0x53,0x3a,0x38,0xf7,0x7c,0xa7,0x78,0x9e,0x5d,0x9f,0xcd};
    mont256_from_bytes_ex(&ctx, ret, num71, 47);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret71, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num72[39] = {0x44,0xf3,0xa2,0x3f,0x78,0x63,0x81,0xdd,0x06,0x0d,0xa2,0xa2,0x56,0xe0,0xde,0x2e,0x99,0xa2,0x24,0x52,0x85,0xf7,0x08,0x81,0x8e,0xd0,0x1f,0x2d,0xac,0x71,0x77,0x4c,0xd9,0x97,0x1a,0x0d,0xae,0x0a,0x35};
    std::uint8_t ret72[32] = {0x1c,0xc3,0x64,0xc6,0xa2,0x56,0xe0,0xde,0x2e,0x99,0xa2,0x24,0x52,0xca,0xea,0xaa,0xc1,0x07,0x33,0xa0,0xed,0xef,0x1a,0x53,0x4d,0x1e,0x8a,0xbc,0x4d,0x6b,0x61,0x59};
    mont256_from_bytes_ex(&ctx, ret, num72, 39);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret72, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num73[32] = {0x86,0x2a,0xf0,0x44,0xa5,0x68,0xcb,0xa8,0x77,0x3c,0x71,0x3c,0xc3,0xe4,0x49,0x78,0x95,0xf1,0xa6,0x02,0xc8,0x5b,0x80,0x27,0x01,0xcb,0x7a,0x45,0x52,0xb2,0xf1,0x08};
    std::uint8_t ret73[32] = {0x86,0x2a,0xf0,0x44,0xa5,0x68,0xcb,0xa8,0x77,0x3c,0x71,0x3c,0xc3,0xe4,0x49,0x78,0x95,0xf1,0xa6,0x02,0xc8,0x5b,0x80,0x27,0x01,0xcb,0x7a,0x45,0x52,0xb2,0xf1,0x08};
    mont256_from_bytes_ex(&ctx, ret, num73, 32);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret73, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num74[24] = {0xd4,0x4b,0xb0,0x5c,0x38,0x92,0x93,0xac,0x1b,0x01,0xb5,0xc3,0x47,0x8e,0xe9,0x15,0xf0,0x70,0x5f,0x7a,0xc7,0xae,0xf6,0xe5};
    std::uint8_t ret74[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0x4b,0xb0,0x5c,0x38,0x92,0x93,0xac,0x1b,0x01,0xb5,0xc3,0x47,0x8e,0xe9,0x15,0xf0,0x70,0x5f,0x7a,0xc7,0xae,0xf6,0xe5};
    mont256_from_bytes_ex(&ctx, ret, num74, 24);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret74, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num75[90] = {0xe8,0x90,0x27,0x52,0x97,0x3a,0xf1,0xfd,0x34,0xbe,0x51,0x90,0xc6,0x93,0x7c,0x22,0x5f,0x6a,0x16,0x2a,0xbf,0xbc,0x93,0xc1,0x09,0xfa,0xac,0xf3,0xa5,0x75,0x77,0x68,0xce,0x00,0x34,0x02,0x44,0xa6,0x7c,0xa3,0x5e,0x90,0x36,0x23,0x6e,0x5d,0xe8,0xa4,0xf5,0x11,0x98,0xef,0xa0,0x82,0xc8,0x95,0x84,0x54,0x1d,0x20,0x66,0x3b,0x0f,0xcc,0x87,0x86,0x64,0x60,0xc7,0xd2,0x73,0xe7,0x59,0xff,0x10,0x3e,0xfb,0x8d,0xf4,0x07,0x46,0xdb,0x2a,0x8f,0x4b,0xd4,0x57,0xac,0x7c,0x4c};
    std::uint8_t ret75[32] = {0x46,0x57,0x1b,0xb1,0x8c,0x13,0x8d,0x97,0xca,0xa1,0x10,0xdb,0x76,0xc7,0x55,0x1c,0x68,0x6e,0xad,0x1a,0x3c,0x9c,0xda,0x27,0xf8,0x21,0x7b,0x6e,0x7d,0x8f,0x78,0x1f};
    mont256_from_bytes_ex(&ctx, ret, num75, 90);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret75, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num76[100] = {0x9f,0xdf,0xba,0xac,0xe7,0x71,0x3a,0xc1,0x31,0xac,0x2f,0x0d,0x95,0x4f,0x8c,0x3c,0x2b,0x0e,0xed,0xff,0x38,0x47,0xd1,0x3c,0xe9,0x17,0xc0,0x00,0x1e,0x48,0x33,0xc4,0xeb,0x1f,0x7a,0x61,0x17,0x9e,0xaa,0x1f,0x78,0x53,0x53,0xb7,0x3d,0x8c,0x6c,0x42,0x51,0xa8,0xe9,0xf3,0x18,0x8b,0x46,0xcf,0x9f,0x79,0x10,0x5e,0x0f,0x63,0x51,0x07,0xad,0xf2,0xe2,0x28,0x8e,0xcd,0x79,0xa6,0xd3,0xd8,0x46,0x9f,0xd2,0xff,0x81,0x0f,0x76,0xf4,0xcb,0x48,0x9c,0xd5,0x7a,0x76,0x80,0xd7,0xe4,0x27,0x0d,0x54,0x63,0x1f,0xcf,0x22,0xb6,0x4e};
    std::uint8_t ret76[32] = {0x20,0x96,0x31,0x69,0xc3,0xfb,0x54,0x89,0x20,0xab,0x37,0x47,0xde,0xf1,0x87,0x0b,0xa0,0xf7,0xcf,0x00,0x59,0x57,0xc3,0x65,0x8b,0x32,0x14,0xee,0xe9,0xa4,0xab,0x83};
    mont256_from_bytes_ex(&ctx, ret, num76, 100);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret76, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num77[32] = {0x6c,0x62,0xd0,0xf0,0xc9,0x48,0x92,0x9a,0xe3,0xb4,0x4b,0x92,0x11,0x7f,0x8c,0x86,0x65,0xb8,0x1d,0xc6,0x0e,0x87,0xd9,0x98,0x0e,0x38,0x6e,0x5e,0xab,0x90,0x77,0x2d};
    std::uint8_t ret77[32] = {0x6c,0x62,0xd0,0xf0,0xc9,0x48,0x92,0x9a,0xe3,0xb4,0x4b,0x92,0x11,0x7f,0x8c,0x86,0x65,0xb8,0x1d,0xc6,0x0e,0x87,0xd9,0x98,0x0e,0x38,0x6e,0x5e,0xab,0x90,0x77,0x2d};
    mont256_from_bytes_ex(&ctx, ret, num77, 32);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret77, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num78[11] = {0x64,0x99,0x00,0xc8,0x1d,0x0d,0xfa,0x61,0x21,0xf4,0xab};
    std::uint8_t ret78[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x99,0x00,0xc8,0x1d,0x0d,0xfa,0x61,0x21,0xf4,0xab};
    mont256_from_bytes_ex(&ctx, ret, num78, 11);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret78, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num79[74] = {0x04,0x5b,0x7a,0x71,0xc2,0x25,0xb8,0x18,0x5e,0xec,0xa3,0x9e,0x1b,0xd5,0xcb,0x25,0x8a,0xc4,0xce,0xdf,0x80,0xbf,0xcc,0xbc,0xe0,0xc9,0xd8,0x57,0xc5,0x25,0x12,0x3e,0x16,0x5c,0x66,0x1e,0x70,0xb0,0x86,0x4d,0x6b,0x8f,0x93,0x64,0x43,0x0e,0x46,0xcf,0x98,0x70,0x10,0x42,0xec,0xbe,0x49,0x6c,0x40,0x3f,0x30,0x85,0x0c,0xd4,0xfe,0x5f,0x4e,0x00,0xbb,0xf0,0x93,0x2a,0xad,0x48,0xfd,0x2c};
    std::uint8_t ret79[32] = {0xe1,0xd0,0x4e,0x02,0x78,0x8d,0x88,0x8a,0x36,0x4c,0x74,0x6f,0xac,0x7d,0xf6,0x49,0x00,0x08,0x3b,0x11,0xca,0xf2,0x75,0xf2,0x65,0x4e,0xa3,0xd3,0xde,0x5e,0x23,0xed};
    mont256_from_bytes_ex(&ctx, ret, num79, 74);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret79, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num80[39] = {0xf8,0x31,0x0c,0xe9,0x97,0x9f,0x49,0x77,0x8f,0xf6,0x05,0xcf,0xd8,0x0a,0x3a,0xd4,0xf1,0x3c,0xbc,0xcd,0xe7,0x11,0x77,0xd8,0x1b,0xf5,0xfd,0x44,0xec,0x9c,0xd9,0xf8,0x85,0x6b,0x9c,0x45,0xe6,0xbe,0xc1};
    std::uint8_t ret80[32] = {0x62,0x1f,0xc6,0x5b,0xcf,0xd8,0x0a,0x3a,0xd4,0xf1,0x3c,0xbc,0xce,0xdf,0x42,0x84,0xc1,0xb3,0x95,0x46,0x5a,0x5c,0xcc,0x83,0xf9,0x7d,0x9c,0xa9,0x30,0x76,0x8f,0x17};
    mont256_from_bytes_ex(&ctx, ret, num80, 39);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret80, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num81[68] = {0xc7,0x16,0x4e,0xef,0x42,0xa2,0x5a,0xf2,0x8b,0x1c,0xe9,0xd1,0x6f,0xd9,0x91,0xc4,0x64,0xca,0x01,0x7f,0x76,0x6c,0xa8,0xda,0xb8,0xb2,0x67,0x8f,0x5c,0xd4,0x58,0x62,0x5e,0xf8,0x66,0xed,0x4b,0x25,0x61,0x01,0x3a,0x08,0x30,0x33,0xf2,0xd0,0xe1,0x4e,0x57,0x6c,0xd5,0x8e,0xb8,0x5c,0x0f,0xb3,0xe9,0x3c,0xbd,0x33,0x8b,0x9a,0xe4,0x70,0xbc,0xc0,0xbc,0x21};
    std::uint8_t ret81[32] = {0xd9,0xd2,0x77,0x7e,0x0c,0x60,0xbb,0xb1,0xf2,0xd4,0xc9,0x48,0xa8,0xd7,0x3e,0xbb,0xf5,0x40,0x76,0x17,0x6b,0x63,0x33,0x5e,0x15,0xdd,0x07,0xe9,0xdc,0xeb,0x27,0x3b};
    mont256_from_bytes_ex(&ctx, ret, num81, 68);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret81, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num82[64] = {0x53,0x6f,0xf5,0x96,0x39,0xac,0x6e,0x2b,0x1d,0x8c,0x2b,0x25,0x3c,0x07,0xf1,0x7f,0x6a,0x17,0xe9,0x47,0x3f,0xde,0x65,0xe0,0x6e,0x92,0x49,0x19,0x35,0x35,0xda,0x3c,0x44,0x31,0x59,0x1b,0x3d,0x95,0x43,0xce,0x8a,0x88,0x72,0x63,0x53,0x55,0x90,0xd9,0x08,0x5c,0x90,0x35,0xef,0x5a,0xf7,0x18,0x9b,0x5d,0xe9,0x50,0x27,0xec,0xc5,0x0d};
    std::uint8_t ret82[32] = {0xb2,0xc0,0xc1,0xfb,0x34,0xc9,0x90,0xd7,0xc8,0x7f,0x5c,0xc0,0xe2,0x44,0xc8,0x83,0xab,0xe6,0xff,0x44,0xf4,0x5a,0x3a,0x73,0x27,0xb3,0x65,0xb9,0x07,0x04,0x46,0xd7};
    mont256_from_bytes_ex(&ctx, ret, num82, 64);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret82, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num83[44] = {0x84,0xd1,0x85,0x0d,0x42,0x23,0x63,0x47,0x88,0xc8,0x3a,0xfc,0x48,0x4f,0x24,0x4a,0x3d,0xab,0xab,0x62,0x6d,0x07,0x82,0x93,0x30,0x03,0x05,0x6c,0x2f,0x01,0x65,0xca,0x53,0x42,0x60,0xc5,0xb4,0xef,0xc7,0x5a,0xcb,0x16,0xe1,0xe5};
    std::uint8_t ret83[32] = {0x98,0x0c,0x47,0x9b,0x3d,0xab,0xab,0x62,0xf1,0xd9,0x07,0xa0,0x72,0x26,0x68,0xb3,0xb7,0xc9,0xa0,0xc6,0x88,0x56,0xc2,0x82,0x7b,0xe4,0xaf,0xb0,0x1a,0xd4,0x05,0x36};
    mont256_from_bytes_ex(&ctx, ret, num83, 44);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret83, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num84[94] = {0xa8,0xd1,0xff,0x39,0xf9,0xca,0x86,0x21,0x46,0x7d,0x28,0x7d,0x2c,0x25,0x52,0xf3,0x9c,0x79,0x23,0xae,0x0a,0xb0,0xe3,0xb3,0x77,0xbe,0x9a,0x2c,0x54,0xd1,0xa1,0x9e,0x3b,0x22,0x58,0x79,0xaa,0x76,0xa7,0x40,0x3d,0x31,0xcb,0x1f,0x78,0x2e,0xfa,0xd9,0x66,0xb0,0xf1,0x34,0x35,0x81,0x4b,0x77,0x8a,0x05,0xd9,0x25,0xff,0x49,0x59,0x22,0x81,0xae,0x16,0xb2,0x95,0xf9,0x3a,0xd9,0x41,0x5c,0xf8,0x84,0x08,0xca,0xea,0x9c,0x5e,0xab,0x86,0xa7,0xc1,0xda,0x87,0xad,0xd4,0x71,0x10,0xfc,0x65,0x39};
    std::uint8_t ret84[32] = {0x39,0xf5,0x3b,0x5e,0xcf,0x20,0xb5,0x6a,0x07,0x6a,0x31,0xba,0x3e,0xb7,0x97,0x9f,0xa0,0x62,0xa2,0x0c,0x37,0xf8,0x2c,0x59,0xc9,0xa0,0xc1,0xd3,0xa4,0x16,0x9d,0xc6};
    mont256_from_bytes_ex(&ctx, ret, num84, 94);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret84, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num85[58] = {0xb8,0xe0,0x04,0x08,0xaa,0x46,0x85,0xf5,0x82,0xb1,0x43,0x32,0xca,0xf7,0x31,0xc1,0x35,0x9d,0x1a,0x94,0xfa,0x94,0x11,0xd6,0xc7,0xea,0xc9,0x09,0x5b,0x8d,0x9d,0x54,0x9f,0x97,0x44,0x3c,0xba,0xd3,0x9e,0x8e,0xbc,0xc4,0x26,0xf4,0x63,0x23,0xb6,0x48,0xb0,0x68,0xc9,0x5f,0x34,0x81,0x6d,0x77,0x7f,0x12};
    std::uint8_t ret85[32] = {0x7e,0x66,0xea,0x4f,0xe0,0x88,0x23,0x6e,0x7a,0x07,0x53,0x97,0x43,0x23,0x56,0x10,0x0a,0x05,0x86,0x23,0x85,0xd3,0x8a,0xc3,0xe2,0xe7,0xce,0x61,0x9c,0xdf,0x8b,0x23};
    mont256_from_bytes_ex(&ctx, ret, num85, 58);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret85, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num86[37] = {0x65,0x69,0xde,0x84,0xab,0x71,0x87,0x9f,0x3e,0x44,0xf3,0xa6,0xc4,0x4d,0x23,0xef,0x85,0xe1,0xf8,0x53,0x98,0x9d,0x1f,0xb4,0x12,0x24,0x65,0x2e,0x7b,0x8d,0x48,0x20,0xea,0xfa,0x24,0xe0,0xe4};
    std::uint8_t ret86[32] = {0xdb,0x66,0x24,0x4e,0x44,0xf3,0xa6,0xc4,0x4d,0x23,0xef,0x85,0xe1,0xf8,0x53,0xfe,0x06,0xfe,0x38,0xbc,0xba,0x86,0xa9,0x6b,0x8d,0x48,0x21,0x50,0x64,0x03,0x65,0xf4};
    mont256_from_bytes_ex(&ctx, ret, num86, 37);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret86, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num87[78] = {0x55,0xe6,0xb0,0xb5,0x00,0xa4,0x4d,0x5b,0xe4,0xe6,0xd4,0xb2,0xc1,0xa1,0x6e,0x4c,0x5a,0xc5,0x06,0x83,0xb8,0x81,0xac,0x6e,0x14,0x7e,0xd5,0x70,0xc6,0xe1,0x38,0xe5,0xb7,0xce,0x04,0xa2,0xa5,0x74,0xe3,0x8f,0x87,0x29,0x73,0xd0,0xee,0xd3,0xf4,0x27,0xc7,0xbc,0x38,0x05,0x26,0xae,0xb2,0x62,0xaf,0x8b,0x6c,0x6e,0x34,0xef,0x21,0xac,0x25,0x9a,0x44,0x2d,0xb1,0xc2,0x0b,0x07,0x35,0xff,0xd8,0xbc,0xd3,0x27};
    std::uint8_t ret87[32] = {0xdc,0xa2,0xea,0xb0,0x8d,0x32,0x5c,0x45,0x7a,0xbe,0x81,0xb4,0x1c,0x17,0x2d,0x1e,0x9a,0x81,0x1d,0x25,0xb8,0x50,0xdf,0xb4,0xeb,0xed,0x54,0x4a,0x5d,0x5a,0xf2,0x7b};
    mont256_from_bytes_ex(&ctx, ret, num87, 78);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret87, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num88[10] = {0x90,0xad,0x18,0xbb,0xf7,0xc8,0xba,0xd2,0xb5,0xc0};
    std::uint8_t ret88[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0xad,0x18,0xbb,0xf7,0xc8,0xba,0xd2,0xb5,0xc0};
    mont256_from_bytes_ex(&ctx, ret, num88, 10);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret88, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num89[16] = {0x4a,0xaf,0x1c,0xe0,0x1d,0x4f,0x5c,0xe1,0x91,0xa9,0x79,0xc2,0xa2,0xcb,0xa9,0x1a};
    std::uint8_t ret89[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4a,0xaf,0x1c,0xe0,0x1d,0x4f,0x5c,0xe1,0x91,0xa9,0x79,0xc2,0xa2,0xcb,0xa9,0x1a};
    mont256_from_bytes_ex(&ctx, ret, num89, 16);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret89, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num90[66] = {0x7f,0x7c,0x11,0x57,0xba,0x2d,0xb0,0xa0,0x79,0x54,0xb2,0x2d,0x07,0xd8,0x6e,0x53,0x62,0x56,0xc7,0xf9,0xc9,0xe9,0xa5,0x11,0x58,0x8e,0xb5,0x56,0x4d,0x45,0x27,0xb5,0x31,0x03,0x36,0x68,0xa3,0x4d,0x45,0xa4,0xc1,0x42,0x94,0x1b,0xf4,0xe8,0xe4,0xb7,0x9b,0x2c,0x22,0xf3,0x65,0x2e,0x77,0x2f,0x2d,0x72,0xa3,0xca,0x76,0x21,0x9c,0x0f,0xfb,0xb2};
    std::uint8_t ret90[32] = {0x56,0xca,0x37,0x8e,0xcf,0x97,0xbd,0xa6,0xbe,0xaa,0xc2,0x7c,0x2d,0x27,0x7e,0xf3,0xa7,0x49,0x84,0x19,0x37,0x55,0xae,0x81,0x6a,0x9d,0xb6,0x0b,0x3c,0xc5,0xf3,0xf3};
    mont256_from_bytes_ex(&ctx, ret, num90, 66);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret90, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num91[54] = {0xe1,0xac,0x8f,0xbb,0xfd,0x79,0x03,0x5b,0xe1,0xa7,0x3c,0xa0,0x91,0x05,0x28,0x10,0xb5,0xa8,0x84,0x62,0x0e,0x33,0x1e,0xef,0x89,0x7f,0xf9,0x45,0xe6,0xc6,0x4d,0x16,0x23,0xae,0x5d,0x94,0xda,0xea,0x55,0x99,0x54,0x85,0xd7,0x82,0x87,0x3a,0x0f,0xa6,0xc1,0x4f,0x1f,0xe5,0xf9,0x74};
    std::uint8_t ret91[32] = {0x2a,0xd8,0x7e,0x52,0xfc,0xa1,0xc8,0x6d,0x89,0xb7,0x96,0x60,0x15,0x62,0x6f,0xb8,0x6d,0x15,0x05,0x32,0x2b,0x0e,0xe1,0xb2,0x07,0x70,0xc8,0xc9,0x9c,0x12,0xf0,0xce};
    mont256_from_bytes_ex(&ctx, ret, num91, 54);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret91, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num92[22] = {0x74,0xc2,0x73,0x2d,0xda,0x63,0x52,0xae,0x46,0xd0,0xbc,0x50,0xb1,0x0e,0x90,0xba,0x20,0x0c,0xc5,0x6a,0x5e,0xfc};
    std::uint8_t ret92[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0xc2,0x73,0x2d,0xda,0x63,0x52,0xae,0x46,0xd0,0xbc,0x50,0xb1,0x0e,0x90,0xba,0x20,0x0c,0xc5,0x6a,0x5e,0xfc};
    mont256_from_bytes_ex(&ctx, ret, num92, 22);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret92, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num93[97] = {0xc8,0x88,0x18,0xa2,0x90,0x0e,0x42,0x06,0x21,0x0f,0xc3,0x48,0xb5,0xe2,0x02,0xcc,0x37,0x6d,0xeb,0xbb,0x4e,0xe7,0x56,0x73,0x8b,0xd6,0x68,0x4f,0x7c,0xaf,0xd0,0x43,0x34,0xe4,0xb5,0xf0,0x87,0x76,0xa0,0x6a,0x9b,0xe8,0xf6,0x7b,0x1e,0x4f,0xa6,0x6b,0x86,0xb7,0x5a,0xe2,0x82,0x46,0x6e,0x43,0x37,0x1b,0xd5,0x2a,0x62,0xbe,0xcc,0x8f,0xfd,0x39,0x16,0xd8,0xa8,0x7e,0x94,0x8d,0xb8,0x6e,0x83,0xd5,0x05,0xb1,0x9d,0xf0,0xfe,0x14,0xe6,0xf4,0x3a,0x17,0x89,0xa7,0x5b,0xd1,0x16,0xee,0xe9,0x7a,0x11,0xab,0x00};
    std::uint8_t ret93[32] = {0xec,0x1b,0x56,0x11,0xbf,0x01,0x1a,0x9c,0x3b,0x34,0x2f,0x88,0x20,0xe6,0x77,0xea,0xd7,0x52,0x0a,0x64,0x6f,0x9e,0x40,0x42,0xa8,0x15,0x93,0x73,0x18,0x19,0xd5,0xdb};
    mont256_from_bytes_ex(&ctx, ret, num93, 97);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret93, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num94[44] = {0x59,0x2d,0x92,0xdc,0x61,0x08,0x4a,0x3a,0x74,0xda,0x4e,0x8f,0x66,0x13,0xf7,0x0b,0x59,0x07,0x03,0x05,0xdc,0xb0,0xb3,0xfc,0x30,0x74,0x6a,0x56,0x7f,0x40,0x98,0x8e,0xfc,0x01,0x0f,0xe4,0xde,0xc8,0xc2,0x9d,0xb6,0x4c,0xa7,0x80};
    std::uint8_t ret94[32] = {0x95,0x24,0x22,0xb1,0x59,0x07,0x03,0x06,0x35,0xde,0x46,0xd8,0x91,0x7c,0xb4,0x90,0xf4,0x1a,0xe7,0x1e,0x26,0x1e,0x77,0x1b,0x98,0xfe,0x9f,0xb4,0xe5,0x5c,0xd3,0x26};
    mont256_from_bytes_ex(&ctx, ret, num94, 44);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret94, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num95[20] = {0x93,0xde,0x8b,0x61,0xcc,0xa0,0xb3,0x3e,0x40,0x3a,0x1f,0x31,0xcc,0xd0,0xb1,0xf3,0x55,0x04,0x15,0x7b};
    std::uint8_t ret95[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x93,0xde,0x8b,0x61,0xcc,0xa0,0xb3,0x3e,0x40,0x3a,0x1f,0x31,0xcc,0xd0,0xb1,0xf3,0x55,0x04,0x15,0x7b};
    mont256_from_bytes_ex(&ctx, ret, num95, 20);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret95, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num96[63] = {0xfa,0xd2,0xf8,0x21,0xde,0x12,0x88,0xef,0xf9,0xb3,0xc6,0xe7,0xfd,0x59,0xb2,0xfe,0x7b,0xf1,0x4f,0xa8,0x09,0x76,0x93,0x3d,0x62,0x14,0x02,0xdb,0x3e,0xa6,0xb1,0x98,0x12,0x1b,0x51,0x8e,0xae,0x35,0x74,0x28,0x22,0x4a,0xb9,0x0b,0x64,0x0f,0xfa,0xe5,0x2d,0xd5,0x8e,0x78,0xcc,0x41,0x64,0xa5,0xc7,0x7d,0xfc,0xb7,0x69,0xa7,0x45};
    std::uint8_t ret96[32] = {0x4d,0xd2,0xf6,0xd6,0xb0,0x03,0x0c,0x44,0xe3,0xf9,0x2d,0x8c,0x65,0x74,0x29,0x81,0xa9,0xb2,0x14,0x51,0x4e,0x53,0xc0,0x60,0xa7,0x57,0xd2,0x5e,0x84,0x32,0x56,0x1f};
    mont256_from_bytes_ex(&ctx, ret, num96, 63);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret96, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num97[54] = {0xcf,0x81,0x1e,0x35,0xaf,0xd2,0x72,0x3e,0x65,0xde,0xe4,0x1b,0xdf,0xc5,0xbc,0xd7,0x4c,0xb3,0x9e,0xb9,0x4e,0x37,0xa6,0x66,0x76,0x93,0x1b,0xdb,0x56,0xe7,0xba,0x2a,0x9e,0x89,0x95,0x94,0x4c,0xf1,0xd4,0x3a,0x35,0x4c,0x66,0xb9,0x91,0x55,0x81,0x46,0xe9,0x66,0xcd,0xff,0x99,0xa2};
    std::uint8_t ret97[32] = {0x94,0xbe,0x55,0xc9,0x8e,0x19,0xbc,0xc6,0x9e,0x47,0x4d,0xd0,0x70,0xa2,0x18,0xf9,0x03,0x69,0x38,0x37,0x0b,0x28,0x26,0xe9,0xb2,0xae,0xfb,0x12,0x9e,0x21,0xc9,0x06};
    mont256_from_bytes_ex(&ctx, ret, num97, 54);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret97, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num98[6] = {0x28,0xcb,0xdd,0x2b,0x06,0x47};
    std::uint8_t ret98[32] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0xcb,0xdd,0x2b,0x06,0x47};
    mont256_from_bytes_ex(&ctx, ret, num98, 6);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret98, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
    std::uint8_t num99[86] = {0xa5,0x3f,0xa0,0xc0,0x17,0x83,0xc3,0xb4,0x36,0xf5,0x16,0xc1,0x23,0x73,0x67,0x95,0x47,0x90,0xc2,0x4a,0x87,0x8e,0xae,0xd2,0x20,0x66,0x78,0x11,0xe9,0xb5,0x1f,0x27,0x1c,0x9e,0x99,0xd0,0xc5,0x2b,0x69,0xd2,0x1b,0x2b,0x8d,0x01,0x18,0x40,0x8c,0xc0,0x6b,0x2d,0xbc,0xa5,0x02,0x19,0x6c,0xd9,0x25,0xd6,0x7b,0xb1,0xf1,0x2c,0xb0,0xc1,0x84,0x1f,0xca,0xe4,0x6b,0xdb,0xce,0xfe,0x04,0x2e,0xed,0x51,0x8f,0xfa,0xb5,0xeb,0x3f,0x08,0x8f,0xe4,0xdd,0x19};
    std::uint8_t ret99[32] = {0x37,0x79,0x46,0x4f,0x3c,0xb3,0x10,0xfe,0x6e,0xe2,0xb4,0xe7,0x7e,0xb4,0xe9,0x60,0xff,0xb3,0x45,0xc7,0xaa,0x5b,0x32,0x70,0x52,0x17,0x5f,0x96,0xc3,0xb5,0x70,0x9d};
    mont256_from_bytes_ex(&ctx, ret, num99, 86);
    mont256_to_bytes(&ctx, ret_data, ret);
    if (std::memcmp(ret99, ret_data, 32) != 0)
    {
        throw std::runtime_error("err in common::mont256_from_bytes_ex");
    }
}
